package com.zhong.beautifulimageapp.model;

import android.content.Context;
import android.util.DisplayMetrics;

/**
 * 公共的值
 * Created by 俊峰 on 2017/7/10.
 */

public class CommonVariable {
    //接口的基础地址
    public static String baseUrl = "https://cnodejs.org/api/v1/";

    public static int getScreenWidthDp(Context context){
        DisplayMetrics metrics = context.getResources().getDisplayMetrics();
        return (int) (metrics.widthPixels / metrics.density);
    }
}
